package oop.ex4.crosswords.strategies;

import java.util.Set;

import oop.ex4.crosswords.CrosswordDictionary;

/**
 * An extended crossword dictionary.
 * @author yomach
 * @author mbattat
 */
public interface ExtendedCrosswordDictionary extends CrosswordDictionary {

	///////////////////////////////////////////////////////
	////////////////////////Constants//////////////////////
	///////////////////////////////////////////////////////
	
	/**
	 * Represents an empty space.
	 */
	public static final char SPACE = ' ';
	
	/**
	 * A string that contains the ABC by order.
	 */
	public static final String ABC = "abcdefghijklmnopqrstuvwxyz-";
	
	///////////////////////////////////////////////////////
	/////////////////////Public Methods////////////////////
	///////////////////////////////////////////////////////
	
	/**
	 * Marks the given word as used one.
	 * @param term The word.
	 * @return True if successful, meaning the word exists and wasn't marked
	 * used.
	 */
	public boolean markAsUsed(String term);

	/**
	 * Marks the given word as unused one. <br>
	 * It is undefined what will be returned if a word that is not in the dictionary
	 * is given (but of course the word will not be added to the
	 * dictionary).
	 * @param term The word.
	 * @return True if successful.
	 */
	public boolean markAsUnused(String term);
	
	/**
	 * The method returns a set of the terms marked as used at the given length.
	 * @param length The length of the terms requested.
	 * @return The set of used terms.
	 */
	public Set<String> getUsedTermsList(int length);
	
	/**
	 * Returns the length of the longest word in the dictionary.
	 * @return The length of the longest word in the dictionary.
	 */
	public int longestWordLength();

	/**
	 * Returns the length of the shortest word in the dictionary.
	 * @return The length of the shortest word in the dictionary.
	 */
	public int shortestWordLength();

	/**
	 * {@inheritDoc} <br>
	 * This will not be affected by the markAsUsed / markAsUnused methods and
	 * should return the entire list of terms.
	 */
	@Override
	Set<String> getTerms();
}